<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/tabs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript">
function openLateFeeTotalDetail(){
    var url = "${ctx}/houseMainLin_houseMainLineAction.do?method=initLateFeeTotalDetail&accountId=${view.accountId}&balance=${view.balance}";
    top.windowOpen(url,"historyAccount","",445,860,true,"");
}
   function openHistoryAccount(){
       var url = "${ctx}/charge_cashieringAction.do?method=houseMainLineHistoryAccountList&keyword=${view.houseId}";
		top.windowOpen(url,"historyAccount","历史帐户",240,800,true,"historyAccount");
   }
   function init(){
   		<c:if test="${1 eq view.hasHistoryBankAccount}">
   			var aobj = "<a href='javaScript:openAccMore();'>";
   			aobj += "<font color='blue'>"
			<c:choose>
				<c:when test="${not empty view.accNumber }">
					aobj += "更多";
				</c:when>
				<c:when test="${empty view.accNumber}">
					aobj += "历史帐号";
				</c:when>
			</c:choose>
			aobj += "</font>"
			aobj += "</a>"
			document.getElementById("moreAccNumber").innerHTML = aobj;
   		</c:if>
   }

   function openAccMore(){
   		var url = "${ctx}/charge_cashieringAction.do?method=initHistoryBankAccount&houseId=${view.houseId}&proRightId=${view.proRightId}"
		top.windowOpen(url,"addBankAccount","银行帐户信息",275,480,true,"bankAccountFrame");
   }
</script>
</head>
<body onload="init();">
<c:if test="${link}">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">${key.houseDetailMessage}</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td border="0" cellspacing="0" cellpadding="0" class="content">
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
  <tr>
    <td>


	  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
</table>
</c:if>
<c:if test="${!link}">
<c:if test="${showButtomType=='1'}">
<script type="text/javascript">

 parent.showMenu();
</script>
</c:if>
</c:if>
	 <table width="100%" border="0" cellpadding="5" cellspacing="1" class="aux_intable_color">
            <tr>
              <td width="12%" bgcolor="#F2F5F8">&nbsp;${view.isVirtual=='0'?key.houseNumber:key.manageNumber}</td>
              <td width="17%" bgcolor="#FFFFFF">${view.houseNumber}</td>
              <td width="12%" bgcolor="#F2F5F8">${key.balence}</td>
              <td width="17%" bgcolor="#FFFFFF" id="td_balance_red"><font color="red"><fmt:formatNumber pattern="###,##0.00" value="${view.balance}"/>&nbsp;${key.yuan}</font></td>
              <td width="12%" bgcolor="#F2F5F8">${key.sureBalence}</td>
              <td width="17%" bgcolor="#FFFFFF" id="td_deposit_red"><fmt:formatNumber pattern="###,##0.00" value="${view.deposit}"/>&nbsp;${key.yuan}</td>
            </tr>
            <tr>
              <td width="12%" bgcolor="#F2F5F8">${key.ownerName}</td>
              <td width="17%" bgcolor="#FFFFFF">${view.participantName}</td>
              <td width="12%" bgcolor="#F2F5F8">${key.principal}</td>
              <td width="17%" bgcolor="#FFFFFF" ><fmt:formatNumber pattern="###,##0.00" value="${view.principal}"/>&nbsp;${key.yuan}</td>
              <td width="12%" bgcolor="#F2F5F8">${key.accOwner}</td>
              <td width="17%" bgcolor="#FFFFFF">${view.accOwner}</td>
            </tr>
            <tr>
              <td width="12%" bgcolor="#F2F5F8">${key.relationHouse}</td>
              <td width="17%" bgcolor="#FFFFFF">
              <c:forEach var="strs" items="${view.relHouses}">
              <c:if test="${strs.accountId==null || strs.proRightId==null}">${strs.houseNumber}</c:if>
              <c:if test="${strs.accountId!=null && strs.proRightId!=null}">
               <a href="${ctx}/houseMainLin_houseMainLineAction.do?method=getHouseChargeMessage&chargeSelect=${view.chargeSelect}&link=${link}&keyword=${strs.houseId}&proRightId=${strs.proRightId}&accountId=${strs.accountId}" class="common_link_word1">${strs.houseNumber}</a>&nbsp;
              </c:if>
              </c:forEach>

              </td>
              <td width="12%" bgcolor="#F2F5F8">${key.lateFee}</td>
              <td width="17%" bgcolor="#FFFFFF" id="td_lateFee_red">
         	 <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><fmt:formatNumber pattern="###,##0.00" value="${view.latefee}"/>&nbsp;${key.yuan}</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td >
                  <c:if test="${view.latefee gt 0.00}">
                  <table border="0" cellpadding="0" cellspacing="0" id="latefeetableId">
                      <tr>
                        <td class="buttonOffLeft" id="btn1_881"></td>
                        <td class="buttonOffMiddle" id="btn1_882" onMouseOver="btn_change_over(88)" onMouseOut="btn_change_out(88)" onblur="btn_change(55)"><a href="#" onFocus="this.blur()" onClick="openLateFeeTotalDetail();return false;" style="color:#000;"><img src="${ctx}/images/chareg_ysjs_cs.gif" border="0" align="absbottom"/>明细</a></td>
                        <td class="buttonOffRight" id="btn1_883"></td>
                      </tr>
                  </table>
                  </c:if>
                  </td>
                </tr>
              </table>
            </td>
              <td width="12%" bgcolor="#F2F5F8">&nbsp;</td>
              <td width="17%" bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
            <tr>
              <td width="12%" bgcolor="#F2F5F8">${key.phone}</td>
              <td width="17%" bgcolor="#FFFFFF">${view.telephone}</td>
              <td width="12%" bgcolor="#F2F5F8">${key.preFee}</td>
              <td width="17%" bgcolor="#FFFFFF" id="td_payBalance_red"><fmt:formatNumber pattern="###,##0.00" value="${view.prePayBalance}"/>&nbsp;${key.yuan}</td>
              <td width="12%" bgcolor="#F2F5F8">&nbsp;</td>
              <td width="17%" bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
          </table>
          <c:set value="${view.houseNumber}" var="a_a_houseNumber" scope="request"></c:set>
		  <%
		  	String houseNumber_temp = (String)request.getAttribute("a_a_houseNumber");
		  	houseNumber_temp = java.net.URLEncoder.encode(java.net.URLEncoder.encode(houseNumber_temp.trim()));
		  	request.setAttribute("a_a_houseNumber",houseNumber_temp);
		  %>
<pms:tabPanel panelId="con_tabPanel"
            iframeId="houseMainLinePanel"
            defaultHeight="300px"
            barWidthLeft="95%"
            barWidthRight="5%"
            hasTop="false">
   <c:if test="${view.isVirtual=='0'}">
      <pms:tab tabId="ownerMessage"
        caption="${key.ownerMessage}"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=queryCustomerInfo&houseIds=${view.houseId}"/>
   </c:if>
   <c:if test="${view.isVirtual=='0'}">
      <pms:tab tabId="houseDetail"
        caption="房屋详细资料"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=houseDetailTabMain&houseId=${view.houseId}"/>
   </c:if>
   <c:if test="${view.isVirtual=='0'}">
      <pms:tab tabId="customerEvent"
        caption="客服服务"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=initCustomerEventMain&houseNumber=${view.houseNumber}"/>
    </c:if>
      <pms:tab tabId="chargeSearch"
        caption="费用查询"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=houseChargeMain&houseId=${view.houseId}&accountId=${view.accountId}&houseNumber=${view.houseNumber}"/>
    <c:if test="${view.isVirtual=='0'}">
       <pms:tab tabId="callInPerson"
        caption="来访人员"
        baseUrl="${ctx}/customer_callInPersonAction.do?method=initCallInPersonMain&houseNumber=${view.houseNumber}&isShowMenu=false"/>
    </c:if>
    <c:if test="${view.isVirtual=='0'}">
       <pms:tab tabId="liveHistroy"
        caption="居住历史"
        baseUrl="${ctx}/customer_hisResidentAction.do?method=initHisResidentSearch&houseNumber=${view.houseNumber}&isShowMenu=false"/>
     </c:if>
     <c:if test="${view.isVirtual=='0'}">
       <pms:tab tabId="renovation"
        caption="装修管理"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=initRenovationMain&houseNumber=${view.houseNumber}"/>
     </c:if>
        <pms:tab tabId="occupation"
        caption="入伙管理"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=occupationMain&houseId=${view.houseId}&houseNumber=${a_a_houseNumber}&isVirtual=${view.isVirtual}"/>
     <c:if test="${view.isVirtual=='0'}">
        <pms:tab tabId="changedProRight"
        caption="产权变更"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=listProRightChange&houseNumber=${view.houseNumber}"/>
     </c:if>
</pms:tabPanel>

<c:if test="${link}">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="window_footer">
		<table border="0" align="right" cellpadding="0" cellspacing="0">
			<tr>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0"
					onClick="windowClose();">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)"
							onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"><img
							src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" />
						${key.close}</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</c:if>
</body>

</html>